package com.designpatterns.cor.concretehandler;

import com.designpatterns.cor.handler.RequestHandle;
import com.designpatterns.cor.request.Request;
import com.designpatterns.cor.request.impl.AddMoneyRequest;

/**
 * PMReuestHandle Class Implements RequestHandle Interface
 * 
 * @see RequestHandle
 * 
 * @author Haiqi.Wang
 * @since 2013-6-9下午12:39:51
 */
public class PMRequestHandle implements RequestHandle {

	RequestHandle rh;

	/**
	 * Arguments Constructor
	 * 
	 * @param rh
	 *            {@link RequestHandle}
	 */
	public PMRequestHandle(RequestHandle rh) {
		this.rh = rh;
	}

	@Override
	public void handleRequest(Request request) {
		if (request instanceof AddMoneyRequest) {
			System.out.println("要加薪，项目经理审批！");
		} else {
			rh.handleRequest(request);
		}
	}

}
